import config from "@/config"
import http from "@/utils/request"

export default {
	student: {
		lists: {
			url: `${config.API_URL}/adminapi/student.student/lists`,
			name: "获取学生列表",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
		add: {
			url: `${config.API_URL}/adminapi/student.student/add`,
			name: "添加学生",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		edit: {
			url: `${config.API_URL}/adminapi/student.student/edit`,
			name: "编辑学生",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
	},
	teacher: {
		lists: {
			url: `${config.API_URL}/adminapi/teacher.teacher/lists`,
			name: "获取老师列表",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
		add: {
			url: `${config.API_URL}/adminapi/teacher.teacher/add`,
			name: "添加老师",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		edit: {
			url: `${config.API_URL}/adminapi/teacher.teacher/edit`,
			name: "编辑老师",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		delete: {
			url: `${config.API_URL}/adminapi/teacher.teacher/delete`,
			name: "删除老师",
			post: async function(params){
				return await http.post(this.url, params);
			}
		},
		deleteAll: {
			url: `${config.API_URL}/adminapi/teacher.teacher/deleteAll`,
			name: "删除老师",
			post: async function(params){
				return await http.post(this.url, params);
			}
		},
	},
	log:{
		lists: {
			url: `${config.API_URL}/adminapi/setting.system.log/lists`,
			name: "获取操作日志",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
	}
}
